using System.ComponentModel.DataAnnotations;
 using System.Data.Entity.ModelConfiguration;
using SalesPages.DomainModel;
namespace SalesPages.EntityFrameworkRepository.Mapping
{
    public class LetterOpinionMap : EntityTypeConfiguration<LetterOpinion>
    {
        public LetterOpinionMap()
        {
            // Primary Key
            this.HasKey(t => t.id);

            // Properties
            this.Property(t => t.letterlevel)
                .HasMaxLength(50);

            this.Property(t => t.lettercomment)
                .HasMaxLength(500);

            // Table & Column Mappings
            this.ToTable("LetterOpinion");
            this.Property(t => t.id).HasColumnName("id");
            this.Property(t => t.letterlevel).HasColumnName("letterlevel");
            this.Property(t => t.Homophones).HasColumnName("Homophones");
            this.Property(t => t.Question).HasColumnName("Question");
            this.Property(t => t.Idiom).HasColumnName("Idiom");
            this.Property(t => t.Test).HasColumnName("Test");
            this.Property(t => t.lettercomment).HasColumnName("lettercomment");
        }
    }
}
